package pATT.profilingAlgorithm.PersonalSearcher;
/***************************************************************************
 *                                  ObjectPager                            * 
 *                       initial version by: Travis Bauer                  *
 *                      copyright (C) 2002 IGLU Research Group             *
 *                              trbauer@indiana.edu                        *
 ***************************************************************************/
/***************************************************************************
 * The licence for this code is included in LICENSE.txt.  If you did not   *
 * get this file with this distribution, request a copy from               *
 * iglu@cs.indiana.edu                                                     *
 ***************************************************************************/

import java.util.Iterator;

/**
 * An interface for ObjectPagers.  An object pager is a repository for
 * Objects.  The objects are put in the repository and and ID number is
 * returned.  The objects may subsequently be requested back from the
 * repository.
 *
 * <p>This allows things like the TermVector class to transparently page out
 * vectors to the disk so that you can have a larger number appear to be in
 * memory at one time.
 *
 */
public interface ObjectPager {
  /** Store an object, and get back an id for the object */
  public Object store(Object o);
  /** Retrieve and object based on it's id */
  public Object retrieve(Object id);
  /** Associate object o with id */
  public void update(Object o, Object id);
  /** remove object associated with id from the repository */
  public void delete(Object id);
  /** iterate over the ids in the pager */
  public Iterator iterator();
}
